<!DOCTYPE html>
<html lang="zh-cn" dir="ltr">
<head>
    <script type="text/javascript" src="<?=base_url().'resource/js/jquery.min.js'?>" ></script>
    <meta charset="UTF-8" />
    <title><?=lang('barcode_dytxm')?></title>
    <style type="text/css">
        body{
            page-break-after:always;
        }
        .printItem{
            height: 25mm;
            width: 45mm;
            text-align: center;
            font-size: 13px;
            overflow: hidden;
            margin-bottom: 2mm;
        }
        .print_content{
            width: 150px;
            margin: 2px;
        }
        .print_footer{
            /*margin-top: 10px;*/
        }
    </style>
</head>

<body >

<?php foreach ($barcodeList as $key=>$rs):?>
    <div class="printItem">
        <div class="print_title"><?=$rs['title']?></div>
        <div class="print_content">
            <?=$rs['barcode']?><?=$rs['sku']?>
        </div>
        <div class="print_footer">date:<?=date('y-m-d H:s')?></div>
    </div>
<?php endforeach; ?>

<div style="clear: both;" class="noprint"></div>

<div class="noprint">
    <input id='btnPrint' type='button' value='<?=lang('barcode_dytxm')?>' />
    <div class="goto_order_detail">
        <a href="<?=blang_url('orders/order/inDetails/'.$oid)?>"><?=lang('barcode_tzdddxq')?></a>
    </div>
</div>

<script type="application/javascript">
    $('#btnPrint').click(function(){
        $('.noprint').css({display:'none'});
        window.print();
        $('.noprint').css({display:'block'});
        $(this).val('<?=lang('barcode_cxdy')?>');
        window.close();
    });
</script>

</body>

</html>

